home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / tlxutl10.zip / AUTODOWN.SLT < prev    next >
Text File  |  1991-01-25  |  1KB  |  37 lines

  1. main()
  2. {
  3.   prints("AUTODOWN 1.00 activated");
  4.   int protocol, stat, t1, t2, t3, t4, t5, t6, t7, t8;
  5.   str filename[12];
  6. TOP:
  7.   filename = "findit!";
  8.   t1 = track ("Protocol Type:  Ymodem/G ",1);
  9.   t2 = track ("Protocol Type:  Xmodem ",0);
  10.   t3 = track ("Protocol Type:  Xmodem-CRC ",0);
  11.   t4 = track ("Protocol Type:  1K-Xmodem ",0);
  12.   t5 = track ("Protocol Type:  1K-Xmodem-G ",0);
  13.   t6 = track ("Protocol Type:  Ymodem ",0);
  14.   t7 = track ("(Ctrl-X) Aborts Transfer",0);
  15.   t8 = track ("- Start your download ...",0);
  16.   while (carrier()) {                 // Program will quit when you hang up
  17.     terminal();
  18.     stat = track_hit(0);
  19.     if (stat == t1) {                 // All of these just set the protocol
  20.       protocol = 'E';                 // to be used during the download
  21.       filename = "";
  22.     } if (stat == t2 or stat == t3)
  23.       protocol = 'X';
  24.     if (stat == t4)
  25.       protocol = '1';
  26.     if (stat == t5)
  27.       protocol = 'G';
  28.     if (stat == t6) {
  29.       protocol = 'Y';
  30.       filename = "";
  31.     } if (stat == t7 or stat == t8) {   // Actually initiate the download
  32.       delay_scr(10);
  33.       receive(protocol,filename);
  34.       }
  35.     }
  36.   track_free(0);
  37. }